package com.ithe.shopweb.serve.impl;

import com.ithe.shopweb.mapper.HomeMapper;
import com.ithe.shopweb.pojo.resp.HomeResp;
import com.ithe.shopweb.serve.HomeServe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 功能：
 * 日期： 2024/5/25 0:43
 */
@Service
public class HomeServeImpl implements HomeServe {

    @Autowired
    private HomeMapper homeMapper;

    @Override
    public List<HomeResp> offerQuery(String offerLocal, String offerStyle, Double minPrice, Double maxPrice,
                                     String offerDegree, String offerDiscount, Integer pageNum, Integer pageSize) {
        return homeMapper.offerQuery(offerLocal, offerStyle, minPrice, maxPrice, offerDegree, offerDiscount, pageNum, pageSize);
    }

    @Override
    public List<HomeResp> offerSearch(String str, Integer pageNum, Integer pageSize) {
        return homeMapper.offerSearch(str, pageNum, pageSize);
    }

    @Override
    public List<HomeResp> offerAll() {
        return homeMapper.offerAll();
    }

    @Override
    public Integer offerDelete(String offerID) {
        return homeMapper.offerDelete(offerID);
    }

    @Override
    public Integer cartAdd(String offerID, String offerImage, String offerName, String offerStyle, Double offerPrice, String offerLocal, String offerDiscount, String offerDegree, Double finalPrice, String offerUser, String cartUser) {
        return homeMapper.cartAdd(offerID, offerImage, offerName, offerStyle, offerPrice, offerLocal, offerDiscount, offerDegree, finalPrice, offerUser, cartUser);
    }
}
